import { request } from '@/utils/request';
import type { NumberResult } from '@/api/house/model/numberModel';

const Api = {
  NumberQuery: '/house.number/query',
  NumberSave: '/house.number/save',
  NumberDelete: '/house.number/delete',
  CheckIn: '/house.number/checkin',
  CheckOut: '/house.number/checkout',
};

export function getNumber() {
  return request.get<NumberResult>({
    url: Api.NumberQuery,
  });
}

export function saveNumber(data: any) {
  return request.post({
    url: Api.NumberSave,
    params: data,
  });
}

export function deleteNumber(data: any) {
  return request.post({
    url: Api.NumberDelete,
    params: data,
  });
}

export function checkIn(data: any) {
  return request.post({
    url: Api.CheckIn,
    params: data,
  });
}

export function checkOut(data: any) {
  return request.post({
    url: Api.CheckOut,
    params: data,
  });
}
